package com.example.dbrun_project;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class activity_uf1 extends Activity {
	
	private String SERVER_ADDRESS;

	private String userId;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.u_f1);
		
		Intent in = this.getIntent();
		userId = in.getStringExtra("userId");
		SERVER_ADDRESS = in.getStringExtra("SERVER_ADDRESS");
		
		Button solve = (Button) findViewById(R.id.changeinfo);
		solve.setOnClickListener(new View.OnClickListener() {

			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(getApplicationContext(),
						activity_uf11.class);
				intent.putExtra("SERVER_ADDRESS", SERVER_ADDRESS);
				intent.putExtra("userId", userId);
				
				startActivity(intent);

			}
		});

		Button date = (Button) findViewById(R.id.myChallenge);
		date.setOnClickListener(new View.OnClickListener() {

			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(getApplicationContext(),
						activity_uf12.class);
				intent.putExtra("userId", userId);
				intent.putExtra("exit", "false");
				intent.putExtra("SERVER_ADDRESS", SERVER_ADDRESS);

				startActivity(intent);
			}
		});

		Button favorit = (Button) findViewById(R.id.favorite_activity_button);
		favorit.setOnClickListener(new View.OnClickListener() {

			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(getApplicationContext(),
						activity_uc1.class);
				intent.putExtra("userId", userId);
				intent.putExtra("SERVER_ADDRESS", SERVER_ADDRESS);
				
				startActivity(intent);
			}
		});
	}
	
}
